import {saveWebEvent} from "../../bomb/db.event.js";
import {setCookie} from "../../utils/cookie.js";
import {dateFormatter} from "../../utils/utils.js";

$(window).bind('beforeunload', function (e) {
    setCookie("beforeunload", dateFormatter(new Date()))
    let webRes = {
        event: "beforeunload",
        xpath: "",
        domHtml: "",
        domText: "",
    };
    saveWebEvent(webRes)
})
